#include <stdio.h>
#include <math.h>

int main(void) {
    int c;
    while (c = getchar(), c != EOF) {
        if (c >= 'A' && c <= 'Z') {
            for (char i = c; i >= 'A'; i--){
                for (int sp = 0; sp < c - i; sp++) {
                    putchar(' ');
                }
                putchar(i);
                for (int sp = 0; sp < (i - 'A') * 2 + 1; sp++) {
                    putchar(' ');
                }
                putchar(i);
                putchar('\n');
            }
            for (int sp = 0; sp < c - 'A' + 1; sp++) {
                putchar(' ');
            }
            putchar('X');
            putchar('\n');
            for (char i = 'A'; i <= c; i++) {
                for (int sp = 0; sp < c - i; sp++) {
                    putchar(' ');
                }
                putchar(i);
                for (int sp = 0; sp < (i - 'A') * 2 + 1; sp++) {
                    putchar(' ');
                }
                putchar(i);
                putchar('\n');
            }
        }
    }
    return 0;
}
